<template>
	<view class="setupBox">
		<view class="item" @click="router('/pages/person/setUp/message')">
			<text>消息设置</text>
			<uni-icons type="forward" size="20" color="grey"></uni-icons>
		</view>
		<view class="item" @click="router('/pages/person/setUp/reply')">
			<text>自动回复</text>
			<uni-icons type="forward" size="20" color="grey"></uni-icons>
		</view>
		<view class="item" @click="router('/pages/person/setUp/system')">
			<text>系统权限</text>
			<uni-icons type="forward" size="20" color="grey"></uni-icons>
		</view>
		<view class="item" @click="router('/pages/person/setUp/security')">
			<text>安全中心</text>
			<uni-icons type="forward" size="20" color="grey"></uni-icons>
		</view>
		<view class="item" @click="router('')">
			<text>清理缓存</text>
			<uni-icons type="forward" size="20" color="grey"></uni-icons>
		</view>
		<view>
			<u-button type="primary" text="退出登录" style='width: 90%; margin: 0 auto; background: red; border: none;' @click='remove'></u-button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			};
		},
		methods: {
			// 跳转
			router(path) {
				// console.log(path)
				uni.navigateTo({
					url: path
				})
			},
			// 退出登录
			remove() {
				localStorage.removeItem('token')
				getApp().globalData.userId = 0
				getApp().globalData.username = ''
				uni.navigateTo({
					url: '/pages/login/login'
				})
			}
		}
	}
</script>

<style lang="scss">
.setupBox{
	width: 100vw;
	height: calc(100vh - 88upx);
	background: rgb(242,243,247);
	overflow: hidden;
	.item{
		width: 100%;
		height: 80upx;
		line-height: 80upx;
		background: white;
		box-sizing: border-box;
		padding: 0 20upx;
		margin: 8upx 0;
		display: flex;
		align-items: center;
		justify-content: space-between;
	}
	.item:nth-child(1) {
		margin-top: 70upx;
	}
	.item:nth-child(5) {
		margin: 20upx 0;
	}
}
</style>
